package main

import (
	"fmt"
	"runtime"
	"time"
)

var channel = make(chan int)

func printer(s string) {
	for _, ch := range s {
		fmt.Printf("%c", ch)
		time.Sleep(300 * time.Millisecond)
	}
}
func person1() {
	printer("hello")
	channel <- 8
}
func person2() {
	printer("world")
}
func main() {
	go person1()
	<-channel
	go person2()
	runtime.Goexit()
}
